class ENAServer extends Ice.Application
{
    
    public int run(String[] args)
    {
	Ice.ObjectAdapter adapter;
	Boolean persistence = true;

	Ice.Properties properties = communicator().getProperties();
	String aux1 = properties.getProperty("persistence");

	if (aux1.equals("no"))
	    persistence = false;

	adapter = communicator().createObjectAdapter("ENAServerAdapter");
	adapter.add(new ENAI(adapter.getCommunicator(), persistence),
		    communicator().stringToIdentity("ena"));

	adapter.activate();

	communicator().waitForShutdown();

	return 0;
    }

    public static void main(String[] args)
    {
	ENAServer ena = new ENAServer();
	int status = ena.main("ENAServer", args);

	System.exit(status);
    }

}
